3.1.4 \(\int \frac {1}{\sqrt {b \tan ^2(e+f x)}} \, dx\) [4]

Optimal. Leaf size=31 \[ \frac {\log (\sin (e+f x)) \tan (e+f x)}{f \sqrt {b \tan ^2(e+f x)}} \]

[Out]

ln(sin(f*x+e))*tan(f*x+e)/f/(b*tan(f*x+e)^2)^(1/2)

________________________________________________________________________________________

Rubi [A]
time = 0.01, antiderivative size = 31, normalized size of antiderivative = 1.00, number of steps used = 2, number of rules used = 2, integrand size = 14, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.143, Rules used = {3739, 3556} \begin {gather*} \frac {\tan (e+f x) \log (\sin (e+f x))}{f \sqrt {b \tan ^2(e+f x)}} \end {gather*}

Antiderivative was successfully verified.

[In]

Int[1/Sqrt[b*Tan[e + f*x]^2],x]

[Out]

(Log[Sin[e + f*x]]*Tan[e + f*x])/(f*Sqrt[b*Tan[e + f*x]^2])

Rule 3556

Int[tan[(c_.) + (d_.)*(x_)], x_Symbol] :> Simp[-Log[RemoveContent[Cos[c + d*x], x]]/d, x] /; FreeQ[{c, d}, x]

Rule 3739

Int[(u_.)*((b_.)*tan[(e_.) + (f_.)*(x_)]^(n_))^(p_), x_Symbol] :> With[{ff = FreeFactors[Tan[e + f*x], x]}, Di
st[(b*ff^n)^IntPart[p]*((b*Tan[e + f*x]^n)^FracPart[p]/(Tan[e + f*x]/ff)^(n*FracPart[p])), Int[ActivateTrig[u]
*(Tan[e + f*x]/ff)^(n*p), x], x]] /; FreeQ[{b, e, f, n, p}, x] &&  !IntegerQ[p] && IntegerQ[n] && (EqQ[u, 1] |
| MatchQ[u, ((d_.)*(trig_)[e + f*x])^(m_.) /; FreeQ[{d, m}, x] && MemberQ[{sin, cos, tan, cot, sec, csc}, trig
]])

Rubi steps

\begin {align*} \int \frac {1}{\sqrt {b \tan ^2(e+f x)}} \, dx &=\frac {\tan (e+f x) \int \cot (e+f x) \, dx}{\sqrt {b \tan ^2(e+f x)}}\\ &=\frac {\log (\sin (e+f x)) \tan (e+f x)}{f \sqrt {b \tan ^2(e+f x)}}\\ \end {align*}

________________________________________________________________________________________

Mathematica [A]
time = 0.06, size = 39, normalized size = 1.26 \begin {gather*} \frac {(\log (\cos (e+f x))+\log (\tan (e+f x))) \tan (e+f x)}{f \sqrt {b \tan ^2(e+f x)}} \end {gather*}

Antiderivative was successfully verified.

[In]

Integrate[1/Sqrt[b*Tan[e + f*x]^2],x]

[Out]

((Log[Cos[e + f*x]] + Log[Tan[e + f*x]])*Tan[e + f*x])/(f*Sqrt[b*Tan[e + f*x]^2])

________________________________________________________________________________________

Maple [A]
time = 0.04, size = 47, normalized size = 1.52

method result size
derivativedivides \(\frac {\tan \left (f x +e \right ) \left (2 \ln \left (\tan \left (f x +e \right )\right )-\ln \left (1+\tan ^{2}\left (f x +e \right )\right )\right )}{2 f \sqrt {b \left (\tan ^{2}\left (f x +e \right )\right )}}\) \(47\)
default \(\frac {\tan \left (f x +e \right ) \left (2 \ln \left (\tan \left (f x +e \right )\right )-\ln \left (1+\tan ^{2}\left (f x +e \right )\right )\right )}{2 f \sqrt {b \left (\tan ^{2}\left (f x +e \right )\right )}}\) \(47\)
risch \(\frac {\left ({\mathrm e}^{2 i \left (f x +e \right )}-1\right ) x}{\sqrt {-\frac {b \left ({\mathrm e}^{2 i \left (f x +e \right )}-1\right )^{2}}{\left ({\mathrm e}^{2 i \left (f x +e \right )}+1\right )^{2}}}\, \left ({\mathrm e}^{2 i \left (f x +e \right )}+1\right )}-\frac {2 \left ({\mathrm e}^{2 i \left (f x +e \right )}-1\right ) \left (f x +e \right )}{\sqrt {-\frac {b \left ({\mathrm e}^{2 i \left (f x +e \right )}-1\right )^{2}}{\left ({\mathrm e}^{2 i \left (f x +e \right )}+1\right )^{2}}}\, \left ({\mathrm e}^{2 i \left (f x +e \right )}+1\right ) f}-\frac {i \left ({\mathrm e}^{2 i \left (f x +e \right )}-1\right ) \ln \left ({\mathrm e}^{2 i \left (f x +e \right )}-1\right )}{\sqrt {-\frac {b \left ({\mathrm e}^{2 i \left (f x +e \right )}-1\right )^{2}}{\left ({\mathrm e}^{2 i \left (f x +e \right )}+1\right )^{2}}}\, \left ({\mathrm e}^{2 i \left (f x +e \right )}+1\right ) f}\) \(197\)

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(1/(b*tan(f*x+e)^2)^(1/2),x,method=_RETURNVERBOSE)

[Out]

1/2/f*tan(f*x+e)*(2*ln(tan(f*x+e))-ln(1+tan(f*x+e)^2))/(b*tan(f*x+e)^2)^(1/2)

________________________________________________________________________________________

Maxima [A]
time = 0.51, size = 35, normalized size = 1.13 \begin {gather*} -\frac {\frac {\log \left (\tan \left (f x + e\right )^{2} + 1\right )}{\sqrt {b}} - \frac {2 \, \log \left (\tan \left (f x + e\right )\right )}{\sqrt {b}}}{2 \, f} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(1/(b*tan(f*x+e)^2)^(1/2),x, algorithm="maxima")

[Out]

-1/2*(log(tan(f*x + e)^2 + 1)/sqrt(b) - 2*log(tan(f*x + e))/sqrt(b))/f

________________________________________________________________________________________

Fricas [A]
time = 2.08, size = 54, normalized size = 1.74 \begin {gather*} \frac {\sqrt {b \tan \left (f x + e\right )^{2}} \log \left (\frac {\tan \left (f x + e\right )^{2}}{\tan \left (f x + e\right )^{2} + 1}\right )}{2 \, b f \tan \left (f x + e\right )} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(1/(b*tan(f*x+e)^2)^(1/2),x, algorithm="fricas")

[Out]

1/2*sqrt(b*tan(f*x + e)^2)*log(tan(f*x + e)^2/(tan(f*x + e)^2 + 1))/(b*f*tan(f*x + e))

________________________________________________________________________________________

Sympy [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \int \frac {1}{\sqrt {b \tan ^{2}{\left (e + f x \right )}}}\, dx \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(1/(b*tan(f*x+e)**2)**(1/2),x)

[Out]

Integral(1/sqrt(b*tan(e + f*x)**2), x)

________________________________________________________________________________________

Giac [B] Leaf count of result is larger than twice the leaf count of optimal. 87 vs. \(2 (32) = 64\).
time = 0.54, size = 87, normalized size = 2.81 \begin {gather*} \frac {\frac {\log \left (\frac {{\left | -\cos \left (f x + e\right ) + 1 \right |}}{{\left | \cos \left (f x + e\right ) + 1 \right |}}\right )}{\sqrt {b} \mathrm {sgn}\left (\tan \left (f x + e\right )\right )} - \frac {2 \, \log \left ({\left | -\frac {\cos \left (f x + e\right ) - 1}{\cos \left (f x + e\right ) + 1} + 1 \right |}\right )}{\sqrt {b} \mathrm {sgn}\left (\tan \left (f x + e\right )\right )}}{2 \, f} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(1/(b*tan(f*x+e)^2)^(1/2),x, algorithm="giac")

[Out]

1/2*(log(abs(-cos(f*x + e) + 1)/abs(cos(f*x + e) + 1))/(sqrt(b)*sgn(tan(f*x + e))) - 2*log(abs(-(cos(f*x + e)
- 1)/(cos(f*x + e) + 1) + 1))/(sqrt(b)*sgn(tan(f*x + e))))/f

________________________________________________________________________________________

Mupad [B]
time = 11.44, size = 34, normalized size = 1.10 \begin {gather*} \frac {\mathrm {atan}\left (\frac {\sqrt {-b}\,\mathrm {tan}\left (e+f\,x\right )}{\sqrt {b\,{\mathrm {tan}\left (e+f\,x\right )}^2}}\right )}{\sqrt {-b}\,f} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(1/(b*tan(e + f*x)^2)^(1/2),x)

[Out]

atan(((-b)^(1/2)*tan(e + f*x))/(b*tan(e + f*x)^2)^(1/2))/((-b)^(1/2)*f)

________________________________________________________________________________________